$mainMod = SUPER

bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
bind  = $mainMod, mouse:275, exec, ~/.config/rofi/launcher.sh
bind  = $mainMod, mouse:276, exec, kitty 

bind = $mainMod,        RETURN, exec, kitty
bind = $mainMod,        W, killactive,
bind = $mainMod,        R, exec, hyprctl reload
bind = $mainMod,        D, exec, ~/.config/rofi/launcher.sh
bind = $mainModCTRLSHIFT,   Q, exit, 
bind = $mainMod,        S, togglefloating, 
bind = $mainMod,        F, fullscreen
bind = $mainModSHIFT,   T, pseudo, # dwindle
bind = $mainMod,        Y, togglesplit, # dwindle

# bind = $mainMod, A, exec,  hyprctl switchxkblayout at-translated-set-2-keyboard next

bind = $mainModSHIFT, P, exec, ~/.config/hypr/scripts/waylogout
bind = CTRLSHIFT,     L, exec, ~/.config/hypr/scripts/lock
bind = SUPERSHIFT,    F, exec, firedragon 
bind = $mainMod,      P, exec, pkill waybar;~/.config/hypr/component/waybar/launch_waybar

# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u 
bind = $mainMod, j, movefocus, d

# pin
bind = $mainMod,u, pin

binde = $mainMod, right, moveactive,40 0
binde = $mainMod, left, moveactive,-40 0 
binde = $mainMod, up, moveactive,0 -40
binde = $mainMod, down, moveactive,0 40

# bind = $mainMod, 
# sets repeatable binds for resizing the active window
binde = $mainModSHIFT, l, resizeactive,40 0
binde = $mainModSHIFT, h, resizeactive,-40 0  
binde = $mainModSHIFT, j, resizeactive,0 40
binde = $mainModSHIFT, k, resizeactive,0 -40

binde = $mainModALT, l, resizeactive,-40 0
binde = $mainModALT, h, resizeactive,-40 0
binde = $mainModALT, k, resizeactive,0 -40
binde = $mainModALT, j, resizeactive,0 -40

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = SUPERSHIFT,1,movetoworkspacesilent,1
bind = SUPERSHIFT,2,movetoworkspacesilent,2
bind = SUPERSHIFT,3,movetoworkspacesilent,3
bind = SUPERSHIFT,4,movetoworkspacesilent,4
bind = SUPERSHIFT,5,movetoworkspacesilent,5
bind = SUPERSHIFT,6,movetoworkspacesilent,6
bind = SUPERSHIFT,7,movetoworkspacesilent,7
bind = SUPERSHIFT,8,movetoworkspacesilent,8
bind = SUPERSHIFT,9,movetoworkspacesilent,9
bind = SUPERSHIFT,0,movetoworkspacesilent,10

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

#CUSTOM

#volume
binde = ,XF86AudioRaiseVolume, exec, ~/.local/bin/volume up
binde = ,XF86AudioLowerVolume, exec, ~/.local/bin/volume down
bind = ,XF86AudioMute, exec, ~/.local/bin/volume mute

# brightness
binde = ,XF86MonBrightnessUp, exec, ~/.local/bin/brightness up 
binde = ,XF86MonBrightnessDown, exec, ~/.local/bin/brightness down

bind=SUPER,g,togglegroup
bind=SUPER,tab,changegroupactive

# custom
bind=CTRL,1,exec,kitty --title fly_is_kitty --hold cava
bind=CTRL,2,exec,code-insiders
bind=CTRL,3,exec,kitty --single-instance --hold donut.c
bind=CTRL,4,exec,kitty --title clock_is_kitty --hold tty-clock -C5

bind = ,Print,   exec, ~/.local/bin/grimblast copy screen
bind = ALT,Print,  exec, ~/.local/bin/grimblast copy area
bind = $mainMod,M, exec, kitty -e ncmpcpp
bind = ,xf86audioplay, exec, mpc -h 127.0.0.2 toggle
